fix(frontend): library-card descriptions for chartjs, d3, echarts#8254
Merged
Conversation
LibraryCard renders its blurb from a hardcoded DESCRIPTIONS map that still listed only the original 11 libraries, so the new JavaScript libs showed an empty description (`DESCRIPTIONS[name] || ''`). Add concise entries for the three JS libraries, matching the existing one-line style, plus a test that asserts a JavaScript library's description renders. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Fixes missing descriptions on the frontend library cards for the newly added JavaScript libraries (Chart.js, D3, ECharts) by extending the hardcoded DESCRIPTIONS map in LibraryCard and adding a regression test to ensure at least one JS library description renders.
Changes:
- Added
chartjs,d3, andechartsentries toLibraryCard.tsx’sDESCRIPTIONSmap. - Added a
LibraryCardunit test asserting the description renders for a JavaScript library (echarts).
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| app/src/components/LibraryCard.tsx | Adds description strings for Chart.js, D3, and ECharts so their cards no longer render blank blurbs. |
| app/src/components/LibraryCard.test.tsx | Adds a regression test to ensure a JavaScript library card renders its description. |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The new JavaScript libraries render no description on their library cards.
LibraryCard.tsxdoesn't read the blurb from the backend — it uses a hardcodedDESCRIPTIONSmap that still listed only the original 11 libraries. For chartjs/d3/echarts,DESCRIPTIONS[name] || ''resolves to an empty string.(The backend
core/constants.pyalready has full descriptions for these libs — that feeds the API/DB path used elsewhere, e.g.ImageCard. This PR only fixes the separate hardcoded frontend map.)Fix
Add concise, one-line entries for the three JS libs, matching the existing style:
Plus a
LibraryCardtest asserting a JS library's description renders (locks the regression).Verified locally:
tsc --noEmitclean,LibraryCard.test.tsx7/7 pass.🤖 Generated with Claude Code